home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Internet / SLCyPart.idl < prev    next >
Encoding:
Text File  |  1996-09-17  |  1.9 KB  |  75 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                SLCyPart.idl
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //    Support for CyberPartExtension. Subclass of CyberPartExtension,
  9. //     which can be customized using callbacks, removing the
  10. //    need to create a new SOM subclass in each part.
  11. //
  12. //========================================================================================
  13.  
  14. #ifndef SLCYPART_IDL
  15. #define SLCYPART_IDL
  16.  
  17. #ifndef __CYBERPARTEXTENSION__
  18. #include <CyberPartExtension.idl>
  19. #endif
  20.  
  21. #pragma somemittypes reset
  22.  
  23. typedef somToken FW_HCyberPartInterfaceCallbacks;
  24.  
  25. module ODF
  26. {
  27.     interface FW_OCyberPartExtension : CyberPartExtension
  28.     {
  29.         // XXX passing a pointer to a SOM object. How does this work with
  30.         // DSOM? Who should own the pointed-to object?
  31.         void             SetCallbacks (in FW_HCyberPartInterfaceCallbacks callbacks);
  32.         void             DefaultOpenCyberItem (in CyberItem item, in ODPart openerPart, in ParameterSet openParams);
  33.         ODBoolean         DefaultHandleCommand (in long commandCreator, in long commandID, in ODFrame frame, in void* commandData);
  34.         
  35.         implementation
  36.         {
  37.             functionprefix = SLCyPart__;
  38.             
  39.             override:
  40.                 Release,
  41.                 OpenCyberItem,
  42.                 SetCyberItem,
  43.                 CanShowCyberItem,
  44.                 ShowCyberItem,
  45.                 GetCyberItemWindow,
  46.                 IsCyberItemSelected,
  47.                 AcquireSelectedCyberItems,
  48.                 IsURLSelected,
  49.                 GetSelectedURL,
  50.                 HandleCommand;
  51.             
  52.             releaseorder:
  53.                 SetCallbacks,
  54.                 DefaultOpenCyberItem,
  55.                 DefaultHandleCommand;
  56.             
  57.             majorversion = 1;
  58.             minorversion = 0;
  59.             
  60.             passthru C_xh =
  61.             "struct FW_SCyberPartExtensionCallbacks;"
  62.             "typedef FW_SCyberPartExtensionCallbacks* FW_HCyberPartInterfaceCallbacks;";
  63.             
  64.             passthru C_xih =
  65.             "#include \"SLCyPart.h\"";
  66.             
  67.             // data:
  68.             FW_HCyberPartInterfaceCallbacks fCallbacks;
  69.         };
  70.     };
  71. };
  72.  
  73. #endif // SLCYPART_IDL
  74.  
  75.